package uk.co.biggroup.lotto.syndicate;


public class Draw {

	private int id;
	private String date = "";
	private String status = "";
	private int type;
	// type 1- lotto 2- euromilion 3- unknown
	private String result = "";

	static int drawCounter = 1;

	protected Draw(int id, String date, String status, int type, String result) 
	{
		setId(id);
		setDate(date);		
		setStatus(status);
		setType(type);
		setResult(result);
		drawCounter++;
	}
	
	public void setId(int setId) {
		id = setId;
	}
	
	public void setStatus(String attStatusset) {
		status = attStatusset;
	}
	
	public void setType(int attType) {
		type = attType;
	}
	
	public void setDate(String attDate) {
		date = attDate;
	}

	public void setResult(String attResult) {
		result = attResult;
	}
	
	public int getId()
	{
		return id;
	}

	public int getType()
	{
		return type;
	}

	public String getDate()
	{
		return date;
	}
	
	public String getStatus()
	{
		return status;
	}
	
	public String getResult()
	{
		return result;
	}

	public int getCounter()
	{
		return drawCounter;
	}
	
	public int compareTo(Draw obj) {
		Draw tmp = (Draw) obj;
		if (this.getId() < tmp.getId()) {
			/* instance lt received */
			return -1;
		} else if (this.getId() > tmp.getId()) {
			/* instance gt received */
			return 1;
		}
		/* instance == received */
		return 0;
	}
	
	
}
